<RCJobs>

  <!--
      DefaultProperties can be override from command line
      pak_root - defines output folder for *.pak-s (required for NAnt build system)
  -->

  <DefaultProperties
    game="Data"
    engine="Engine"
    l10n="Localization"
    src="."
    trg="..\Output\_rc_${p}"
    pak_root="..\Output\_rc_pak_${p}"
    build_root="..\Output\_rc_build_${p}"
    enable_cuda="true"
    process_tif="true"
    ps3EdgeFormat="1"
    rcDir="Bin32\rc"
    secondRun="false"
    split_dds="false"
    />

  <Properties
    xml_types="*.animevents;*.animsettings;*.adb;*.bspace;*.cdb;*.cdf;*.chrparams;*.comb;*.dlg;*.ent;*.fsq;*.fxl;*.ik;*.json;*.lmg;*.mtl;*.setup;*.xml;*.node;*.veg;"
    non_xml_types="*.ag;*.gfx;*.png;*.usm;*.fev;*.fsb;*.fdp;*.sfk;*.ogg;*.txt;*.anm;*.cal;*.i_caf;*.skel;*.skin;*.grd;*.grp;*.cfg;*.csv;*.lua;*.dat;*.ini;*.xls;*.as;*.lut;*.mp2;*.mp3;*.xma"

    src_game="${src}\${game}"
    src_engine="${src}\${engine}"
    src_l10n="${src}\${game}\${l10n}"
    trg_game="${trg}\${game}"
    trg_engine="${trg}\${engine}"
    trg_l10n="${trg}\${game}\${l10n}"
    pak_game="${pak_root}\${game}"
    pak_engine="${pak_root}\${engine}"
    pak_l10n="${pak_root}\${game}\${l10n}"
	
	/>

  <if enable_cuda="true">
    <Properties imagecompressor="CTsquish" />
  </if>
  <ifnot enable_cuda="true">
    <Properties imagecompressor="CTsquish" />
  </ifnot>
  <TestJob>
  </TestJob>

  <!-- Convert jobs that can not be run in parallel due to rc bugs -->
  <ConvertSerialJob>
  </ConvertSerialJob>
    <!-- Convert jobs that can be un in parallel -->
  <ConvertParallelJob>
    <Job targetroot="${trg_game}"  input="*.i_caf" animConfigFolder="Animations" cafAlignTracks="1" dbaStreamPrepare="0" />
  
    <Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="*.cgf" VertexPositionFormat="F16" SplitLODs="1" />
    <Job sourceroot="${src_engine}" targetroot="${trg_engine}" input="*.cgf" VertexPositionFormat="F16" SplitLODs="1" />
    <Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="*.cga" VertexPositionFormat="F16" SplitLODs="1" />

    <if process_tif="true">
      <if split_dds="false">
        <Job sourceroot="${src_game}"    targetroot="${trg_game}"   input="*.tif" imagecompressor="${imagecompressor}" />
        <Job sourceroot="${src_engine}"  targetroot="${trg_engine}" input="*.tif" imagecompressor="${imagecompressor}" />
        <Job sourceroot="${src_game}"    targetroot="${trg_game}"   input="*.dds" copyonly="1" />
        <Job sourceroot="${src_engine}"  targetroot="${trg_engine}" input="*.dds" copyonly="1" />
      </if>
      <ifnot split_dds="false">
        <Job sourceroot="${src_game}"    targetroot="${trg_game}"   input="*.tif" imagecompressor="${imagecompressor}" streaming="1" />
        <Job sourceroot="${src_engine}"  targetroot="${trg_engine}" input="*.tif" imagecompressor="${imagecompressor}" streaming="1" />
        <Job sourceroot="${src_game}"    targetroot="${trg_game}"   input="*.dds" />
        <Job sourceroot="${src_engine}"  targetroot="${trg_engine}" input="*.dds" />
      </ifnot>
    </if>
  </ConvertParallelJob>
  
    <!-- Backwards compatible job that runs both parallel and serial conversion jobs -->
  <ConvertJob>
    <Run Job="ConvertSerialJob"/>
    <Run Job="ConvertParallelJob"/>
  </ConvertJob>
  <CopyJob>
	<Job sourceroot="${src_game}\Levels" input="*.lyr;*.cry;*.pak;*.cfg;*.gfx;*.lay;*.lgt;*.settings;*.tmd;*.tod;*.txt;*.dat" targetroot="${trg_game}\Levels" copyonly="1" />
	<Job sourceroot="${src_game}\Objects" input="*.anm;*.caf;*.cal;*.gfx;*.grd;*.grp;dummy.txt" targetroot="${trg_game}\Objects" copyonly="1" />
	<Job sourceroot="${src_game}\Scripts" input="*.cfg;*.csv;*.lua;*.txt" targetroot="${trg_game}\Scripts" copyonly="1" />
	<Job sourceroot="${src_game}\Animations" input="*.ag;*.caf;*.cal" targetroot="${trg_game}\Animations" copyonly="1"/>
	<Job sourceroot="${src_game}\Libs" input="*.as;*.cfg;*.dat;*.gfx;*.lua;*.lut;*.txt;*.usm" targetroot="${trg_game}\Libs" copyonly="1" />
	<Job sourceroot="${src_game}\GameLayers" input="*.lyr;" targetroot="${trg_game}\GameLayers" copyonly="1" />
	<Job sourceroot="${src_game}\Textures" input="*.gfx;*.png;*.usm" targetroot="${trg_game}\Textures" copyonly="1"/>
	<Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="*.chr" copyonly="1"/>
    <Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="*.skin" copyonly="1"/>
    <Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="*.skel" copyonly="1"/>
    <Job sourceroot="${src_game}"   targetroot="${trg_game}"   input="${xml_types}" overwriteextension="xml" copyonly="1" exclude="${src_l10n}"/>
    <Job sourceroot="${src_engine}" targetroot="${trg_engine}" input="${xml_types}" overwriteextension="xml" copyonly="1"/>
    <Job sourceroot="${src_l10n}"   targetroot="${trg_l10n}"   input="*.*" overwriteextension="xml" copyonly="1"/>
  </CopyJob>
  
  <PakJob>
	<Job sourceroot="${trg_game}" input="Entities\*.*"    zip="${pak_game}\GameData.pak" />
	<Job sourceroot="${trg_game}" input="Libs\*.*"        zip="${pak_game}\GameData.pak" exclude="*.dds*" />
	<Job sourceroot="${trg_game}" input="GameLayers\*.*"  zip="${pak_game}\GameData.pak" />
	<Job sourceroot="${trg_game}" input="Materials\*.*"   zip="${pak_game}\GameData.pak" exclude="*.dds*" />
	<Job sourceroot="${trg_game}" input="Libs\*.dds*"      zip="${pak_game}\GameData.pak" />
	<Job sourceroot="${trg_game}" input="Materials\*.dds*" zip="${pak_game}\GameData.pak" />
	<Job sourceroot="${trg_game}" input="Scripts\*.*"     zip="${pak_game}\Scripts.pak" />
	<Job sourceroot="${trg_game}" input="objects\*.*"     zip="${pak_game}\Objects.pak" />
	<Job sourceroot="${trg_game}" input="Animations\*.*"     zip="${pak_game}\Animations.pak" />
	<Job sourceroot="${trg_game}" input="Textures\*.*"     zip="${pak_game}\Textures.pak" />
  </PakJob>
	
	
</RCJobs>